
$(function(){
    setInterval("loadDateAndWeek()",1000);
    loadHeader();//加载头部指标
    showRealTimeFullLoad();//加载线路实时满载率信息
    loadSectionFullLoadTrend();//top5区间饱和度变化趋势图
    loadMaxSectionFullLoad();//区间饱和度柱状图
    loadLineFullLoadTopEight();//饱和度变化趋势图前八条
    loadLineFullLoadBottomSeven();//饱和度变化趋势图后七条
});

function loadDateAndWeek(){
	var dateTime = new Date().format("yyyy-MM-dd hh:mm:ss");
	$("#realTime").html(dateTime);
}

function loadHeader(){
	$.ajax({
        type: "post",
        url: "fullload/loadHeader",
        dataType: "json",
        success: function (data) {
        	if(data.length>0){
        		$("#lineCount").html(data[0].lineCount);
        		$("#sectionCount").html(data[0].sectionCount);
        		$("#largeHundred").html(data[0].largeHundred);
        		$("#largeFifty").html(data[0].largeFifty);
        	}
    	}
    });
}

function showRealTimeFullLoad(){
	var bgStr="";
    $.ajax({
        type: "post",
        url: "fullload/realTimeFullLoad",
        dataType: "json",
        success: function (data) {
        	$("#realTimeFullLoad").html("");
        	
        	for(var i in data){
        		bgStr+="<tr><td>"+data[i].lineName+"</td>";
        		bgStr+="<td>"+data[i].timeSection+"</td>";
        		bgStr+="<td>"+(data[i].saturation*100).toFixed(2)+"%</td></tr>";
			}
			$("#realTimeFullLoad").html(bgStr);
    	}
    });
}
function encapsulationData(series,name,data,i){
	var colorList = ['#9DD1D8','#256FB8','#F18927','#E84A70','#9F4595','#702070','#E6C62C','#87B848','#D8281E']
	var serie = {
	        name: name,
	        type: 'line',
	        smooth: true,
	        showAllSymbol: true,
	        symbol: 'emptyCircle',
	        symbolSize: 8,
	        color : colorList[i],
	        itemStyle: {
	                normal: {
	                	label: {
	                        show: false,
	                        position: "top",
	                        formatter: function(params){
	                            return params.value+'%';
	                        }
	                    }
	            	},
	        },
	        data: data
	    };
	series.push(serie);
	return series;
}
function loadSectionFullLoadTrend(){
	var colorList = ["#E6171C","#8BBF45","#F2D12F","#B699C4","#333366"];
	var dataX = [];
	var currentSectionName = "";
	var myChart = echarts.init(document.getElementById('sectionFullLoadTrend'));
	
	var legends = [];
	var vars = [];
	var c = 0;
	$.ajax({
        type: "post",
        url: "fullload/loadSectionFullLoadTrend",
        dataType: "json",
        success: function (data) {
        	var varName = 'dataY'+(c+1);
        	for(var i in data){
        		if(dataX.indexOf(data[i].timeSection)<0){
    				//lengends不存在该记录，添加
        			dataX.push(data[i].timeSection);
    			}
        		if(legends.indexOf(data[i].sectionName)<0){
    				//lengends不存在该记录，添加
        			legends.push(data[i].sectionName);
    			}
        		
        		//第一次进入赋值
        		if(currentSectionName == ''){
        		    vars[varName]= [];
        			vars[varName].push((data[i].saturation*100).toFixed(2));
        			currentSectionName = data[i].sectionName;
        		}
        		else if(currentSectionName == data[i].sectionName){
        			vars[varName].push((data[i].saturation*100).toFixed(2));
        		}
        		else if(currentSectionName != ''&&currentSectionName !== data[i].sectionName){
        			c++;
        			varName = 'dataY'+(c+1);
        		    vars[varName]= [];
        			vars[varName].push((data[i].saturation*100).toFixed(2));
        			currentSectionName = data[i].sectionName;
        		}
        		
        		
			}
        	var seriesData = [];
//        	//封装series
        	for(var i in vars){
        		var realI = i.substring(5);
        		encapsulationData(seriesData,legends[realI-1],vars[i],realI)
        	}
        	
        	var option = {
    			    tooltip: {
    			        trigger: 'axis',
    			        formatter:function(param){
	    		        	var tooltipStr = param[0].name+"<br>";
	    		        	for(var p in param){
	    		        		tooltipStr+=param[p].marker+" " + param[p].seriesName+"："+param[p].value+"%<br>";
	    		        	}
							return tooltipStr;
        		        }
    			    },
    			    legend: [
    			    	{
    			            x:'right',
    			            top:'10%',
    			            orient: "vertical", // 'vertical'纵向显示
    			            icon: "circle",   //  这个字段控制形状  类型包括 circle，rect ，roundRect，triangle，diamond，pin，arrow，none
    			            textStyle:{
    			            	color : 'grey'
    			            },
    			            align:'left',
    			            data: legends
    			        }
    			    ],
    			    
    			    grid:{
    			    	top:'15%',
    			        left: '10%',  
    					right: '30%',
    					bottom: '15%', 
    			    },
    			    xAxis: {
    			    	name:"时间",
    			        data: dataX,
    			        axisLine: {
    			            lineStyle: {
    			                color: 'grey'
    			            }
    			        },
    			        axisTick:{
    			            show:false,
    			        },
    			    },
    			    yAxis: {
    			    	name:"满载率",
			        	splitLine: {
    			        	show: true,
    			        	type:'dashed',    //设置网格线类型 dotted：虚线   solid:实线
    			        	lineStyle:{
    			        		color:'grey'
    			        	}
			        	},
    			        axisLine: {
    			            lineStyle: {
    			                color: 'grey',
    			            }
    			        },
    			        axisLabel:{
    			        	formatter:'{value}%',
    			        	align:'center',
    			        	margin : '30',
    			        	fontSize:12
    			        	
    			        }
			    	},
    			    
    			    series: seriesData
    			};
        	myChart.setOption(option);
    	}
    });
	
	
	
}

function loadMaxSectionFullLoad(){
	
	var myChart = echarts.init(document.getElementById('maxSectionFullLoad'));
	
	var dataX = [];
	var dataY =  new Array();//累计人数
	$.ajax({
        type: "post",
        url: "fullload/loadMaxSectionFullLoad",
        dataType: "json",
        success: function (data) {
        	for(var i in data){
        		dataX.push(data[i].lineName);
        		dataY.push({lineColor:data[i].lineColor,sectionName:data[i].sectionName,value:(data[i].saturation*100).toFixed(2)});
			}
        	var option = {
        		    tooltip: {
        		        trigger: 'axis',
        		        formatter:function(param){
        		        	var tooltipStr = "";
        		        	for(var i=0;i<param[0].name.split("-").length;i++){
        		        		tooltipStr += param[0].name.split("-")[i]+"<br>";
        		        	}
	    		        	for(var p in param){
	    		        		tooltipStr+=param[p].data.sectionName+"<br>";
	    		        		tooltipStr+=param[p].marker+" " + param[p].seriesName+"："+param[p].value+"%<br>";
	    		        	}
	    		        	return tooltipStr;
        		        }
        		    },
        			grid:{
        				top :'10%',
        				left: '10%',  
        				right: '10%',
        				bottom:'5%'
        		    },
        		    yAxis: [
        		        {
        		        	name:"线路",
        		        	data: dataX,
        		        	axisLine: {
        			            lineStyle: {
        			                color: 'grey'
        			            }
        			        },
        			        axisLabel:{
        			        	interval: 0,//强制显示所有标签
        			        	align: 'center',
        			        	margin : '30',
        			        	fontSize:12
        			        },
        			        axisTick:{
        			            show:false,
        			        },
        			        
        		            
        		        }
        		    ],
        		    xAxis: {
        		    	name:"满载率",
        		    	splitLine: {show: false},
        		        axisLine: {
        		            lineStyle: {
        		                color: 'grey',
        		            }
        		        },
        		        axisLabel:{
        		            formatter:'{value}%',
        		        },
        		        splitLine :{    //网格线
	        		        lineStyle:{
	        		            type:'dashed'    //设置网格线类型 dotted：虚线   solid:实线
	        		        },
	        		        show:false //隐藏或显示
        		        }

        	    	},
        		    series: [
        		        {
        		            name:'满载率',
        		            type:'bar',
        		            barWidth: 15,
        		            itemStyle: {
        		                normal: {
        		                    barBorderRadius: 5,
        		                    color: function(params){
        		                    	return params.data.lineColor;
        		                    },
        		                    opacity:0.8,
        		                    label: {
        		                        show: true,
        		                        position: "right",
        		                        formatter:function(params){
        		                        	return params.value+"%";
        		                        }
        		                    },
        		                }
        		        
        		            },
        		            data:dataY
        		        }
        		    ]
        		};
        	
        	myChart.setOption(option);
    	}
    });
}

function loadLineFullLoadTopEight(){
	var colorList = ['#D8281E','#87B848','#E6C62C','#702070','#9F4595','#E84A70','#F18927','#256FB8']
	var dataX = [];
	var dataY1 = [];
	var dataY2 = [];
	var dataY3 = [];
	var dataY4 = [];
	var dataY5 = [];
	var dataY6 = [];
	var dataY7 = [];
	var dataY8 = [];
	
	var myChart = echarts.init(document.getElementById('lineFullLoadTopEight'));
	
	$.ajax({
        type: "post",
        url: "fullload/loadLineFullLoadTopEight",
        dataType: "json",
        success: function (data) {
        	for(var i in data){
        		if(data[i].lineId==1){
        			dataX.push(data[i].timeSection);
        			dataY1.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==2){
        			dataY2.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==3){
        			dataY3.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==4){
        			dataY4.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==5){
        			dataY5.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==6){
        			dataY6.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==7){
        			dataY7.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==8){
        			dataY8.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
			}
        	var option = {
    			    tooltip: {
    			        trigger: 'axis',
    			        formatter:function(param){
	    		        	var tooltipStr = param[0].name+"<br>";
	    		        	for(var p in param){
	    		        		tooltipStr+=param[p].marker+" " + param[p].seriesName+"："+param[p].value+"%<br>";
	    		        	}
							return tooltipStr;
        		        }
    			    },
    			    legend: [
    			    	{
    			            x:'right',
    			            top:'10%',
    			            orient: "vertical", // 'vertical'纵向显示
    			            icon: "circle",   //  这个字段控制形状  类型包括 circle，rect ，roundRect，triangle，diamond，pin，arrow，none
    			            textStyle:{
    			            	color : 'grey',
    			            },
    			            align:'left',
    			            data: ['1号线', '2号线','3号线','4号线', '5号线','6号线','7号线', '8号线']
    			        }
    			    ],
    			    
    			    grid:{
    			    	top:'10%',
    			        left: '10%',  
    					right: '12%', 
    					bottom: '10%', 
    			    },
    			    xAxis: {
    			    	name:"时间",
    			        data: dataX,
    			        axisLine: {
    			            lineStyle: {
    			                color: 'grey'
    			            }
    			        },
    			        axisTick:{
    			            show:false,
    			        },
    			        axisLabel:{
    			        	interval: 0,//强制显示所有标签
    			        },
    			    },
    			    yAxis: {
    			    	name:"满载率",
    			        splitLine: {
    			        	show: true,
    			        	type:'dashed',    //设置网格线类型 dotted：虚线   solid:实线
    			        	lineStyle:{
    			        		color:'grey'
    			        	}
			        	},
    			        axisLine: {
    			            lineStyle: {
    			                color: 'grey',
    			            }
    			        },
    			        axisLabel:{
    			        	formatter:'{value}%',
    			        }
			    	},
    			    
    			    series: [
    			    	{
    			        name: '1号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			        	normal: {
			                	label: {
			                        show: false,
			                        position: "top",
			                        formatter: function(params){
			                            return params.value+'%';
			                        }
			                    },
			                    color: colorList[0],
			                    lineStyle:{
		    			        	normal:{
		    			        		opacity:'0.8'
		    			        	}
		    			        },
		                	}
    			        },
    			        data: dataY1
    			    },
    			    {
    			        name: '2号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			        	normal: {
			                	label: {
			                        show: false,
			                        position: "top",
			                        formatter: function(params){
			                            return params.value+'%';
			                        }
			                    },
			                    color: colorList[1],
			                    lineStyle:{
		    			        	normal:{
		    			        		opacity:'0.8'
		    			        	}
		    			        },
		                	}
    			        },
    			        data: dataY2
    			    },
    			    {
    			        name: '3号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			        	normal: {
			                	label: {
			                        show: false,
			                        position: "top",
			                        formatter: function(params){
			                            return params.value+'%';
			                        }
			                    },
			                    color: colorList[2],
			                    lineStyle:{
		    			        	normal:{
		    			        		opacity:'0.8'
		    			        	}
		    			        },
		                	}
    			        },
    			        data: dataY3
    			    },
    			    {
    			        name: '4号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			        	normal: {
			                	label: {
			                        show: false,
			                        position: "top",
			                        formatter: function(params){
			                            return params.value+'%';
			                        }
			                    },
			                    color: colorList[3],
			                    lineStyle:{
		    			        	normal:{
		    			        		opacity:'0.8'
		    			        	}
		    			        },
		                	}
    			        },
    			        data: dataY4
    			    },
    			    {
    			        name: '5号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			        	normal: {
			                	label: {
			                        show: false,
			                        position: "top",
			                        formatter: function(params){
			                            return params.value+'%';
			                        }
			                    },
			                    color: colorList[4],
			                    lineStyle:{
		    			        	normal:{
		    			        		opacity:'0.8'
		    			        	}
		    			        },
		                	}
    			        },
    			        data: dataY5
    			    },
    			    {
    			        name: '6号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			        	normal: {
			                	label: {
			                        show: false,
			                        position: "top",
			                        formatter: function(params){
			                            return params.value+'%';
			                        }
			                    },
			                    color: colorList[5],
			                    lineStyle:{
		    			        	normal:{
		    			        		opacity:'0.8',
		    			        		color: function(params){
	    			                    	return params.data.lineColor;
	    			                    },
		    			        	}
		    			        },
		                	}
    			        },
    			        data: dataY6
    			    },
    			    {
    			        name: '7号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[6],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        },
    		                	}
    			        },
    			        data: dataY7
    			    },
    			    {
    			        name: '8号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			        	normal: {
			                	label: {
			                        show: false,
			                        position: "top",
			                        formatter: function(params){
			                            return params.value+'%';
			                        }
			                    },
			                    color: colorList[7],
			                    lineStyle:{
		    			        	normal:{
		    			        		opacity:'0.8'
		    			        	}
		    			        }
		                	}
    			        },
    			        data: dataY8
    			    },
    			   ]
    			};
        	myChart.setOption(option);
    	}
    });
}

function loadLineFullLoadBottomSeven(){
	var colorList = ['#9DD1D8','#CAADD2','#871B20','#27826B','#E19DC1','#83C7C5','#C1827F','#D6A361']
	var dataX = [];
	var dataY9 = [];
	var dataY10 = [];
	var dataY11 = [];
	var dataY12 = [];
	var dataY13 = [];
	var dataY16 = [];
	var dataY17 = [];
	var dataY18 = [];
	
	var myChart = echarts.init(document.getElementById('lineFullLoadBottomSeven'));
	
	$.ajax({
        type: "post",
        url: "fullload/loadLineFullLoadBottomSeven",
        dataType: "json",
        success: function (data) {
        	for(var i in data){
        		if(data[i].lineId==9){
        			dataX.push(data[i].timeSection);
        			dataY9.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==10){
        			dataY10.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==11){
        			dataY11.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==12){
        			dataY12.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==13){
        			dataY13.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==16){
        			dataY16.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==17){
        			dataY17.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
        		if(data[i].lineId==18){
        			dataY18.push({lineColor:data[i].lineColor,value:(data[i].saturation*100).toFixed(2)});
        		}
			}
        	var option = {
    			    tooltip: {
    			        trigger: 'axis',
    			        formatter:function(param){
	    		        	var tooltipStr = param[0].name+"<br>";
	    		        	for(var p in param){
	    		        		tooltipStr+=param[p].marker+" " + param[p].seriesName+"："+param[p].value+"%<br>";
	    		        	}
							return tooltipStr;
        		        }
    			    },
    			    legend: [
    			    	{
    			            x:'right',
    			            top:'10%',
    			            orient: "vertical", // 'vertical'纵向显示
    			            icon: "circle",   //  这个字段控制形状  类型包括 circle，rect ，roundRect，triangle，diamond，pin，arrow，none
    			            textStyle:{
    			            	color : 'grey',
    			            },
    			            align:'left',
    			            data: ['9号线', '10号线','11号线','12号线', '13号线','16号线','17号线','18号线']
    			        }
    			    ],
    			    
    			    grid:{
    			    	top:'10%',
    			        left: '10%',  
    					right: '12%', 
    					bottom: '10%', 
    			    },
    			    xAxis: {
    			    	name:"时间",
    			        data: dataX,
    			        axisLine: {
    			            lineStyle: {
    			                color: 'grey'
    			            }
    			        },
    			        axisTick:{
    			            show:false,
    			        },
    			        axisLabel:{
    			        	interval: 0,//强制显示所有标签
    			        },
    			    },
    			    yAxis: {
    			    	name:"满载率",
    			        splitLine: {
    			        	show: true,
    			        	type:'dashed',    //设置网格线类型 dotted：虚线   solid:实线
    			        	lineStyle:{
    			        		color:'grey'
    			        	}
			        	},
    			        axisLine: {
    			            lineStyle: {
    			                color: 'grey',
    			            }
    			        },
    			        axisLabel:{
    			        	formatter:'{value}%',
    			        }
			    	},
    			    
    			    series: [
    			    	{
    			        name: '9号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[0],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        }
    		                	},
    			        },
    			        data: dataY9
    			    },
    			    {
    			        name: '10号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        color: function(params){
	                    	return params.data.lineColor;
	                    },
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[1],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        }
    		                	},
    			        },
    			        data: dataY10
    			    },
    			    {
    			        name: '11号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        color: function(params){
	                    	return params.data.lineColor;
	                    },
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[2],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        }
    		                	}
    			        },
    			        data: dataY11
    			    },
    			    {
    			        name: '12号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        color: function(params){
	                    	return params.data.lineColor;
	                    },
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[3],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        }
    		                	}
    			        },
    			        data: dataY12
    			    },
    			    {
    			        name: '13号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        color: function(params){
	                    	return params.data.lineColor;
	                    },
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[4],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        }
    		                	},
    			        },
    			        data: dataY13
    			    },
    			    {
    			        name: '16号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        color: function(params){
	                    	return params.data.lineColor;
	                    },
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[5],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        }
    		                	}
    			        },
    			        data: dataY16
    			    },
    			    {
    			        name: '17号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        color: function(params){
	                    	return params.data.lineColor;
	                    },
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[6],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        }
    		                	}
    			        },
    			        data: dataY17
    			    },
    			    {
    			        name: '18号线',
    			        type: 'line',
    			        smooth: true,
    			        showAllSymbol: true,
    			        symbol: 'emptyCircle',
    			        symbolSize: 8,
    			        color: function(params){
	                    	return params.data.lineColor;
	                    },
    			        itemStyle: {
    			                normal: {
    			                	label: {
    			                        show: false,
    			                        position: "top",
    			                        formatter: function(params){
    			                            return params.value+'%';
    			                        }
    			                    },
    			                    color: colorList[6],
    			                    lineStyle:{
    		    			        	normal:{
    		    			        		opacity:'0.8'
    		    			        	}
    		    			        }
    		                	}
    			        },
    			        data: dataY18
    			    }
    			   ]
    			};
        	myChart.setOption(option);
    	}
    });
}
